home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
VXTT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-24
|
4KB
|
114 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: class.hpp
// Title: C++ Class Libraries
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
// This module contains code for the class VX_TT.
//
// The code in this module may be written in C++ or C.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Constants
//----------------------------------------------------------------------------
#define VX_TT_MAX (20) // Maximum allowed TT characters
#define VX_TT_ALL (0x03FF) // All characters
#define VX_TT_0 (0x0001) // Indivually allowed characters
#define VX_TT_1 (0x0002)
#define VX_TT_2 (0x0004)
#define VX_TT_3 (0x0008)
#define VX_TT_4 (0x0010)
#define VX_TT_5 (0x0020)
#define VX_TT_6 (0x0040)
#define VX_TT_7 (0x0080)
#define VX_TT_8 (0x0100)
#define VX_TT_9 (0x0200)
#define VX_TT_POUND (0x0400)
#define VX_TT_STAR (0x0800)
enum VX_TT_STATUS
{
VX_TT_SUCCESS = 0, // Success
VX_TT_FAIL, // Query failed
VX_TT_STOP, // User request abort!
VX_TT_TIMEOUT, // Request timed out
VX_TT_DEFAULT, // User did not enter anything
VX_TT_INVALID, // Invalid entry or too short
};
//----------------------------------------------------------------------------
// Class VX_TT
//----------------------------------------------------------------------------
CLASSDEF(VX_TT);
#define VX_TT_PARENT VX_VOX
class CLASSTYPE VX_TT : public VX_TT_PARENT
{
CHAR szBuf[VX_TT_MAX+1]; // Buffer for characters
VX_TT_STATUS status; // Status of last query
FLAG16 fs; // Flags
SIZET cMin; // Minimum number of characters
SIZET cMax; // Maximum number of characters
public:
FN_M VX_TT();
FN_M VX_TT(RCVX_TT);
virtual FN_M ~VX_TT();
virtual BOOL FN_M Destroy(BOOL = TRUE);
virtual BOOL FN_M Initialize(SHORT = CL_INIT_ALL);
RCVX_TT FN_M operator=(RCVX_TT);
FN_M operator PCSZ() const
{
return (PCSZ)szBuf;
}
FN_M operator PSZ() const
{
return (PSZ)szBuf;
}
VX_TT_STATUS FN_M Query(BOOL = FALSE);
virtual BOOL FN_M Retrieve(PCSZ, PCSZ = NULL);
VX_TT_STATUS FN_M Status()
{
return status;
}
FLAG16 FN_M SetFlags(FLAG16 = VX_TT_ALL);
BOOL FN_M SetLength(SIZET = 1, SIZET = VX_TT_MAX);
virtual BOOL FN_M Store(PCSZ, PCSZ = NULL);
};
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------